<template>
    <div class="my-svg">
        <svg class="icon" aria-hidden="true">
            <use :href="iconName"></use>
        </svg>
    </div>
</template>

<script>
    import '../../assets/js/iconfont'
    export default {
        name: "index",
        props:{
            name:{
                type:String
            }
        },
        created(){
        },
        computed:{
            iconName(){
                return '#'+this.name
            }
        }
    }
</script>

<style scoped>
    .my-svg{
        display: inline-block;
    }
    .icon {
        width: 1em; height: 1em;
        vertical-align: -0.15em;
        fill: currentColor;
        overflow: hidden;
    }

</style>
